package com.ktjy.dao.impl;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
import org.apache.log4j.Logger;


import java.lang.reflect.Method;



public class VocalConcertMethodInterceptor implements MethodInterceptor {
    private Logger logger = Logger.getLogger(VocalConcertMethodInterceptor.class);
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        before();
        Object feedback=methodProxy.invokeSuper(o,objects);
        after();
        return feedback;
    }
    public void before(){
        logger.info("抢时代少年团的票");
        logger.info("准备去看");
    }
    public void after(){
        logger.info("去看时代少年的演唱会");
    }
}
